<?php


namespace App\Services;


use App\Exceptions\BusinessException;

class BaseServices
{
    protected static $instance;

    public static function getInstance(){
        if(static::$instance instanceof static){
            return static::$instance;
        }
        static::$instance = new static();
        return static::$instance;
    }

    public function throwBusinessException($code){
        throw new BusinessException($code);
    }
}
